//
//  ControllerViewController.m
//  SwiftDEMO
//
//  Created by J on 16/6/10.
//  Copyright © 2016年 J. All rights reserved.
//

#import "ControllerViewController.h"
#import <objc/runtime.h>
#import "SwiftDEMO-Swift.h"

@implementation NSObject(ControllerViewController)

+ (void)load{
    

//    swizzleMethod(NSClassFromString(@"SwiftDEMO.ViewController"), self.class, NSSelectorFromString(@"fuck"), @selector(ThisviewDidLoad));
}

- (void)ThisviewDidLoad{
    [self ThisviewDidLoad];
    
    NSLog(@"xxx");
}




void swizzleMethod(Class class,Class class2, SEL originalSelector, SEL swizzledSelector)   {
    Method originalMethod = class_getInstanceMethod(class, originalSelector);
    Method swizzledMethod = class_getInstanceMethod(class2, swizzledSelector);
    
    method_exchangeImplementations(originalMethod, swizzledMethod);

}



@end
